﻿// CQueryRoomTypeDlg.cpp: 实现文件
//

#include "pch.h"
#include "HotelManagementMFC.h"
#include "afxdialogex.h"
#include "CQueryRoomTypeDlg.h"


// CQueryRoomTypeDlg 对话框

IMPLEMENT_DYNAMIC(CQueryRoomTypeDlg, CDialog)

CQueryRoomTypeDlg::CQueryRoomTypeDlg(CWnd* pParent /*=nullptr*/)
	: CDialog(IDD_DLG_ROOMTYPE_QUERY, pParent)
{

}

CQueryRoomTypeDlg::~CQueryRoomTypeDlg()
{
}

void CQueryRoomTypeDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_LIST_ROOMTYPE, m_listRoomType);
}


BEGIN_MESSAGE_MAP(CQueryRoomTypeDlg, CDialog)
END_MESSAGE_MAP()


// CQueryRoomTypeDlg 消息处理程序


BOOL CQueryRoomTypeDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// TODO:  在此添加额外的初始化
	m_listRoomType.InsertColumn(0, L"客房类型编号", LVCFMT_CENTER, 120);
	m_listRoomType.InsertColumn(1, L"客房类型名称", LVCFMT_CENTER, 120);
	m_listRoomType.InsertColumn(2, L"客房类型面积", LVCFMT_CENTER, 120);
	m_listRoomType.InsertColumn(3, L"客房类型价格", LVCFMT_CENTER, 120);

	m_listRoomType.ModifyStyle(0, LVS_REPORT | LVS_SHOWSELALWAYS);
	m_listRoomType.SetExtendedStyle(LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP);

	return TRUE;  // return TRUE unless you set the focus to a control
	// 异常: OCX 属性页应返回 FALSE
}
